home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-06-28 | 1.1 KB | 46 lines | [TEXT/CWIE] |
- // ArrangementBase.h
-
- #ifndef ArrangementBase_h
- #define ArrangementBase_h
-
- #ifndef View_h
- #include "View.h"
- #endif
- #ifndef ArrangedPane_h
- #include "ArrangedPane.h"
- #endif
-
- class ArrangementBase: public View
- {
- private:
- ArrangedPane *const panes;
- const uint32 paneCount;
-
- protected:
- void SetParents();
-
- virtual void GainMapping();
- virtual void LoseMapping();
- virtual void ChangeBounds( Rectangle oldBounds );
-
- virtual void Arrange( Rectangle ) = 0;
-
- public:
- ArrangementBase( ArrangedPane *thePanes,
- uint32 paneCount );
-
- uint32 PaneCount() const { return paneCount; }
- ArrangedPane& operator[]( uint32 i ) { Assert( i < paneCount ); return panes[i]; }
- const Pane& operator[]( uint32 i ) const { Assert( i < paneCount ); return panes[i]; }
-
- virtual void Draw( const ViewMap& ) const;
- virtual TangibleView *Touch( PointObject );
-
- // These are handy for setting up overrides to the methods in Sizeable:
- uint16 Minimum( uint16 (Sizeable::*dimension)() ) const;
- uint16 Maximum( uint16 (Sizeable::*dimension)() ) const;
- uint16 Total( uint16 (Sizeable::*dimension)() ) const;
- };
-
- #endif
-